package kiwi.uima.enhancer;

import kiwi.media.Annotation;

import org.apache.uima.analysis_component.CasAnnotator_ImplBase;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.CASException;
import org.apache.uima.jcas.JCas;

public class MediaItemAnnotator extends CasAnnotator_ImplBase {

	@Override
	public void process(CAS cas) throws AnalysisEngineProcessException {
		JCas jcas;
		try {
			jcas = cas.getJCas();
			Annotation annotation = new Annotation(jcas);
			annotation.setAnnotator("MediaItemAnnotator");
			annotation.setBegin(0);
			annotation.setEnd(cas.getDocumentText().length());
			annotation.addToIndexes();	
		} catch (CASException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}